<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"   
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:c="http://java.sun.com/jsp/jstl/core"
       xmlns:f="http://java.sun.com/jsf/core"
      >

    <ui:param name="root" value="#{request.contextPath}/" />
    <h:head>
        <!-- Twitter Bootstrap Style & ScrumPMT Custom Modifications -->
        <link rel="stylesheet" type="text/css" href="#{root}css/bootstrap.css"/>                
        <ui:insert name="head">
            <title>Scrum PMT</title>
        </ui:insert>
    </h:head>

    <h:body>
        <f:view locale="#{idiomaBean.locale}">
        <c:choose>
            <!-- Template para cuando el usuario esta logueado -->
            <c:when test="${not empty login.nombre}">
                <ui:insert name="header" >
                    <ui:include src="/templates/commonHeaderLogged.xhtml" />
                </ui:insert>
                <div class="container" style="margin-top: 40px;">
                    <div class="content">
                        <ui:insert name="content" />
                    </div>
                </div>
            </c:when> 

            <!-- Template para cuando el usuario no esta logueado -->
            <c:otherwise>
                <ui:insert name="header" >
                    <ui:include src="/templates/commonHeader.xhtml" />
                </ui:insert>
                <div class="container mt40">
                    <div class="content">
                        <ui:include src="/login.xhtml" />
                    </div>
                </div>
            </c:otherwise>
        </c:choose>

        <div id="footer" class="mt20">
            <ui:insert name="footer" >
                <ui:include src="/templates/commonFooter.xhtml" />
            </ui:insert>
        </div>
       </f:view>
    </h:body>
</html>